package action.model;

import action.BaseAction;
import entity.D_rules;
import service.model.D_rulesService;

@SuppressWarnings("serial")
public class D_rulesAction extends BaseAction {

	private D_rules d_rules;
	private D_rulesService d_rulesService;
	private String F_ID;
	private static final String HQL="from D_rules where F_ID=:F_ID";
	
	public String method() throws Exception {
		//	TODO
		return SUCCESS;
	}
	
	public String query() throws Exception {
		//	TODO
		String[] paramNames = {"F_ID"};
		Object[] values = {F_ID};
		getSession().put("d_rules", d_rulesService.queryByNamedParam(HQL, paramNames, values));
		return "query";
	}
	
	
	//	setters and getters
	
	public D_rules getD_rules() {
		return d_rules;
	}

	public void setD_rules(D_rules d_rules) {
		this.d_rules = d_rules;
	}

	public void setD_rulesService(D_rulesService d_rulesService) {
		this.d_rulesService = d_rulesService;
	}

	public D_rulesService getD_rulesService() {
		return d_rulesService;
	}

	public String getF_ID() {
		return F_ID;
	}

	public void setF_ID(String f_ID) {
		F_ID = f_ID;
	}

}
